package com.gidgabs.modules.api.service;

import com.gidgabs.common.utils.ReturnJson;
import com.gidgabs.dto.TbShoppingCarDto;
import com.gidgabs.modules.entity.TbShoppingCarEntity;

import java.util.List;
import java.util.Map;

/**
 * 购物车表
 * 
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-02 10:07:07
 */
public interface TbShoppingCarService {
	
	TbShoppingCarEntity queryObject(Integer id);
	
	List<TbShoppingCarEntity> queryList(Map<String, Object> map);
	
	int queryTotal(Map<String, Object> map);
	
	void save(TbShoppingCarEntity shoppingCar);
	
	void update(TbShoppingCarEntity shoppingCar);
	
	void delete(Integer id);
	
	void deleteBatch(Integer[] ids);

	/**
	 * 查询我的购物车列表 分页
	 * @param pageSize
	 * @param pageNo
	 * @param userId
	 * @return
	 */
	ReturnJson<TbShoppingCarDto> queryShoppingCarList(Integer pageSize, Integer pageNo, Integer userId);

	TbShoppingCarEntity selectTbShoppingCarObjSingle(TbShoppingCarEntity obj);

	/**
	 * 通过TbShoppingCar的id更新TbShoppingCar中属性不为null的数据
	 *
	 * @param enti
	 * @return
	 */
	int updateNotNullTbShoppingCarById(TbShoppingCarEntity enti);

	/**
	 * 通过TbShoppingCar的id获得TbShoppingCar对象
	 *
	 * @param id
	 * @return
	 */
	TbShoppingCarEntity selectTbShoppingCarById(Integer id);

}
